Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First things first, thank you very much for this package. It's very useful functionally and I also found the code a pleasure to read in the sense that it's simple to understand despite the fact that I'm not at all familiar with these kinds of widgets and extending
RenderBox
. Well commented and intelligently structured.This PR adds an option to start scrolling the header once the bottom of the body is visible rather than remaining sticky until the header no longer fits in the visible content. I made this tweak for my own purposes but perhaps it can be useful to others, if not at least an example for anyone requesting similar behaviour. I found the naming tricky so I'm open to suggestions on that!
I use sticky headers to show an image that is relevant to just a few rows that follow it (some rows don't have an associated image). My motivation for using sticky headers is to make sure the image is completely visible for all of the associated rows and since the image takes up quite a bit of visual real estate I want it to scroll out of the way as soon as the last associated list item is completely visible.
Here's the ListView builder: